#include <pthread.h>
#include <stdio.h>

void* func(void* arg){
	printf("in thread:%d, process:%d\n",(unsigned int)pthread_self(),(unsigned int)getpid());
	sleep(300);
}

int main(){
	int count=5;
	int i;
	int ret;
	pthread_t pths[count];
	for(i=0;i<count;i++){
		ret=pthread_create(&pths[i],NULL,func,NULL);
		if(ret!=0){
			printf("create thread %d error\n",count);
		}
	}
	sleep(200);
}
